package com.qf.day08;

import com.qf.day04.ArrUtils;
import com.qf.day06.Animal;
import com.qf.day06.Fish;

import java.util.Arrays;

public class Demo01 {
    public static void main(String[] args) {
        Fish[] fish = new Fish[3];
        Fish fish1 = new Fish("小黄黄", "金鱼", 5, "女", "腮");
        Fish fish2 = new Fish("小黑", "鲤鱼", 2, "男", "腮");
        Fish fish3 = new Fish("小蓝", "鲸鱼", 5, "男", "肺");
        fish[0]=fish1;
        fish[1]=fish2;
        fish[2]=fish3;
        for (int i = 0; i < fish.length; i++) {
            System.out.println(fish[i]);

        }
        System.out.println("=====================");
        Arrays.sort(fish);
        for (int i = 0; i < fish.length; i++) {
            System.out.println(fish[i]);

        }
    }
}
